package com.clear.auth.common.enums;

import lombok.Getter;

/**
 * 权限类型枚举
 */
@Getter
public enum AuthPermissionTypeEnum {
    MENU(0, "菜单"),
    OPERATION(1, "操作");

    private int code;
    private String desc;

    AuthPermissionTypeEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static AuthPermissionTypeEnum getByCode(int codeVal) {
        for (AuthPermissionTypeEnum authUserStatusEnum : AuthPermissionTypeEnum.values()) {
            if (authUserStatusEnum.code == codeVal) {
                return authUserStatusEnum;
            }
        }
        return null;
    }

}
